package cn.iocoder.yudao.module.dify.controller.admin.taskprocessingrecords.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;

import org.redisson.client.protocol.convertor.StringToListConvertor;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;

import static cn.iocoder.yudao.module.dify.enums.DictTypeConstants.DIFY_PROCESS_STATUS;
import static cn.iocoder.yudao.module.dify.enums.DictTypeConstants.DIFY_WORKFLOW_TYPE;

@Schema(description = "管理后台 - 用户调用dify任务工作流处理记录 Response VO")
@Data
@ExcelIgnoreUnannotated
public class TaskProcessingRecordsRespVO {

    @Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "15672")
    @ExcelProperty("主键ID")
    private Long id;

    @Schema(description = "用户选择文件id列表", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty(value = "用户选择文件id列表")
    private List<String> fileIdList;

    @Schema(description = "原始文件名列表", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
    @ExcelProperty("原始文件名列表")
    private List<String> originalName;

    @Schema(description = "Dify接口请求ID", example = "5448")
    @ExcelProperty("Dify接口请求ID")
    private String difyRequestId;

    @Schema(description = "Dify生成的文件下载URL", example = "https://www.iocoder.cn")
    @ExcelProperty("Dify生成的文件下载URL")
    private String difyDownloadUrl;

    @Schema(description = "Dify链接过期时间")
    @ExcelProperty("Dify链接过期时间")
    private LocalDateTime difyExpiresAt;

    @Schema(description = "Dify接口返回数据")
    @ExcelProperty("Dify接口返回数据")
    private String difyResponse;

    @Schema(description = "MinIO访问URL", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn")
    @ExcelProperty("MinIO访问URL")
    private String minioUrl;

    @Schema(description = "处理状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @ExcelProperty(value = "处理状态", converter = DictConvert.class)
    @DictFormat(DIFY_PROCESS_STATUS) // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer processStatus;

    @Schema(description = "重试次数", requiredMode = Schema.RequiredMode.REQUIRED, example = "5654")
    @ExcelProperty("重试次数")
    private Integer retryCount;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

    @Schema(description = "任务类型", example = "2")
    @ExcelProperty(value = "任务类型", converter = DictConvert.class)
    @DictFormat(DIFY_WORKFLOW_TYPE) // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer type;

}